﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using Wix.Aura.Common.CustomTypes;
using System.Globalization;

namespace Wix.Aura.Common {
	public class Package : IXmlSerializable {
		private Package() { }

		public Package(Guid id) {
			Id = id;
		}

		public Guid Id { get; private set; }
		public YesNoType AdminImage { get; set; }
		public string Comments { get; set; }
		public YesNoType Compressed { get; set; }
		public string Description { get; set; }
		public int? InstallerVersion { get; set; }
		public InstallPrivileges InstallPrivileges { get; set; }
		public string Keywords { get; set; }
		public string Languages { get; set; }
		public string Manufacturer { get; set; }
		public string Platforms { get; set; }
		public YesNoDefaultType ReadOnly { get; set; }
		public YesNoType ShortNames { get; set; }
		public LocalizableInteger SummaryCodePage { get; set; }

		public System.Xml.Schema.XmlSchema GetSchema() {
			throw new NotImplementedException();
		}

		public void ReadXml(System.Xml.XmlReader reader) {
			throw new NotImplementedException();
		}

		public void WriteXml(System.Xml.XmlWriter writer) {
			writer.WriteStartElement("Package");
			writer.WriteAttribute("Id", Id);
			writer.WriteAttribute("AdminImage", AdminImage);
			writer.WriteAttribute("Comments", Comments);
			writer.WriteAttribute("Compressed", Compressed);
			writer.WriteAttribute("Description", Description);
			writer.WriteAttribute("InstallerVersion", InstallerVersion);
			writer.WriteAttribute("InstallPrivileges", InstallPrivileges);
			writer.WriteAttribute("Keywords", Keywords);
			writer.WriteAttribute("Languages", Languages);
			writer.WriteAttribute("Manufacturer", Manufacturer);
			writer.WriteAttribute("Platforms", Platforms);
			writer.WriteAttribute("ReadOnly", ReadOnly);
			writer.WriteAttribute("ShortNames", ShortNames);
			writer.WriteAttribute("SummaryCodepage", SummaryCodePage);
			writer.WriteEndElement();
		}
	}
}
